package com.dingding.utils;

import com.dingding.entity.UserSession;

/**
 * 用户session
 *
 * @author DingXintao
 * @date 2023/10/18 9:38
 **/
public class SessionUserUtil {
    private static final ThreadLocal<UserSession> threadLocal = new ThreadLocal<>();

    public static void set(UserSession user) {
        threadLocal.set(user);
    }

    public static UserSession get() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}
